Fix: FinOps frontend bugs — dimension selector, quality query gate, titleize dedup#115
Closed
cursor[bot] wants to merge 3 commits intomainfrom
Closed
Fix: FinOps frontend bugs — dimension selector, quality query gate, titleize dedup#115cursor[bot] wants to merge 3 commits intomainfrom
cursor[bot] wants to merge 3 commits intomainfrom
Conversation
…rom overview tab, deduplicate titleize utility - workflow-compare-card: always render dimension selector even when current dimension has fewer than 2 options, so users can switch dimensions - overview-tab: remove quality query from hard loading/data gates so the tab renders cost/productivity data even if quality fetch fails - Extract titleize() into @/lib/utils and import it in all 4 consumer files instead of duplicating the function definition
04bbdfe to
bce1585
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes three frontend bugs in the FinOps and workflow components.
Bug 1: Empty state hides dimension selector (workflow-compare-card)
When the default dimension (
workflow_archetype) had fewer than two workflows, the early-return empty state rendered without the dimension<select>. Users with data inworkflow_fingerprintbut notworkflow_archetypehad no way to switch dimensions.Fix: Extract the dimension selector into a shared JSX variable and render it in both the empty state and the normal comparison view.
Bug 2: Quality fetch failure blanks entire FinOps overview tab
The
qualityquery was added as a hard blocking dependency for the entire overview tab. If it errored or was slow, the KPIs, charts, and workflow cost table were all hidden even though they loaded successfully.Fix: Remove
qualityfrom the loading/data gates. Passquality.data?.attribution ?? []toWorkflowCompareCard, which already handles missing quality data gracefully via optional chaining.Bug 3: Duplicated
titleizeutilityThe
titleizefunction was identically defined in 4 separate component files.Fix: Add a single
titleize()export to@/lib/utilsand update all 4 consumer files to import it from there.Files changed
frontend/src/components/finops/workflow-compare-card.tsxfrontend/src/components/finops/overview-tab.tsxfrontend/src/lib/utils.tsfrontend/src/components/growth/bright-spot-cards.tsxfrontend/src/components/growth/workflow-playbook-cards.tsxfrontend/src/components/bottlenecks/root-cause-cluster-list.tsxfrontend/src/components/projects/project-workflow-section.tsx